package net.qhzw.vip.qiyu.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult;
import net.qhzw.vip.qiyu.entity.SysUserTopupOrder;
import net.qhzw.vip.qiyu.model.SysUserTopupOrderVo;
import net.qhzw.vip.qiyu.result.PageResult;

import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;

public interface SysUserTopupOrderService extends IService<SysUserTopupOrder> {

    /***
     * 用户充值金额
     * @param amount
     * @return
     */
    WxPayMpOrderResult usrRchgGold(BigDecimal amount, Long userId);


    /***
     * 分页查询用户充值订单
     * @param page
     * @param userTopupOrderVo
     * @return
     */
    PageResult<SysUserTopupOrderVo> findByPage(Page<SysUserTopupOrder> page, SysUserTopupOrderVo userTopupOrderVo, Long shopId);


    /***
     * 后台审核充值
     * @param id
     * @param status
     * @return
     */
    boolean audit(Long id, Byte status, String auditOpinion, Long userId);

    /**
     * 用户充值支付回调
     * @param payNo
     * @param transactionId
     */
    void payNotify(String payNo, String transactionId);

    void deleteByUserId(Long userId);

    void exportLedger(HttpServletResponse response, Long shopId,SysUserTopupOrderVo userTopupOrderVo);
}
